<template>
  <div class="index">
    <Carousel :list="bannerList" />
    <div>
      <div class="main-title">
        <h1>案例展示</h1>
        <p>casedisplay</p>
      </div>
      <CaseCarousel />
    </div>
    <div class="index-news">
      <div class="main-title">
        <h1>新闻资讯</h1>
        <p>newsinformation</p>
      </div>
      <div class="con">
        <div class="u-flex u-row-between box">
          <div class="flex-1 images">
            <el-image
              style="width: 388px; height: 306px"
              :src="require('@/assets/img/news.png')"
              fit="scale-down"
            ></el-image>
          </div>
          <div class="news-list">
            <div class="item" :class="{active:i==1}" v-for="i in 7" :key="i"> 
              <div class="time">2022-04-06</div>
              <div class="title">东森医疗建设</div>
            </div>
          </div>
        </div>
        <div class="more">更多资讯<span class="bold u-m-l-6">+</span></div>
      </div>
    </div>
  </div>
</template>

<script>
import Carousel from "@/components/carousel/carousel";
import CaseCarousel from "@/components/carousel/CaseCarousel";

export default {
  name: "Index",
  components: {
    Carousel,
    CaseCarousel
  },
  data() {
    return {
      bannerList: [
        { url: require("@/assets/img/banner.png") },
        { url: require("@/assets/img/banner.png") },
        { url: require("@/assets/img/banner.png") },
      ],
    };
  },
};
</script>
<style lang="scss" scoped>
$color: #058e70;
.index {
  background: #eeeeee;
  padding-bottom: 130px;
}
.main-title {
  text-align: center;
  h1 {
    font-size: 42px;
    letter-spacing: 20px;
    color: #474747;
    margin-bottom: 20px;
  }
  p {
    text-transform: uppercase;
    letter-spacing: 20px;
    color: $color;
  }
}

.index-news {
  .con {
    background: #ffffff;
    width: 1200px;
    padding-top: 52px;
    margin: auto;
    .box {
      padding: 0 150px;
      .images {
        width: 388px;
      }
    }
    .more {
      width: 194px;
      height: 40px;
      line-height: 40px;
      background: #c9cbca;
      color: #6c6c6c;
      font-size: 18px;
      margin: 38px auto;
      text-align: center;
      cursor: pointer;
    }
    &::after {
      background: $color;
      display: block;
      content: " ";
      height: 9px;
    }
  }
}
.news-list {
    width: 480px;
    .item{
        display: flex;
        color: #585858;
        height: 40px;
        line-height: 40px;
        border-bottom: 2px dashed #eee;
        padding: 2px 0;
        cursor: pointer;
        .time{
            width: 130px;
            height: 40px;
            text-align: center;
            background: #c9cbc8;
            margin-right: 30px;
        }
        &:last-child{
            border-bottom: none;
        }
        &:hover,&.active{
            transform:scaleX(1.01);
            color: #058e70;
            font-weight: bold;
            .time{
                background: #058e70;
                color: #ffffff;
            }
        }
    }
}
</style>
